import request from '@/utils/request'


import {baseUrlConfig} from "@/config/config";
const basePath = baseUrlConfig.businessBaseUrl;

// 初始化评分规则
// export const initCodePoint = () => {
//   return request({
//     url: basePath + '/secure/assessInfo/getCodePoint',
//     method: 'get'
//   })
// }
//获取隐患清单分页列表
export const initRiskList = (data: any) => {
  return request({
    url: basePath + '/tcdmSecureHazardList/findPage',
    method: 'post',
    data
  })
}
// 初始化评分规则
export const initCodePoint = () => {
  return request({
    url: basePath + '/secure/assessInfo/getCodePoint',
    method: 'get'
  })
}
//修改隐患清单
export const addAssessInfo = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardList/put',
    method: 'put',
    data
  })
}

//隐患考核分页查询
export const listPage = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessment/findPage',
    method: 'post',
    data
  })
}

//查询隐患清单扣分标准
export const queryAssess = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessmentRules/queryByCondition',
    method: 'post',
    data
  })
}

//查询隐患清单列表
export const queryEarly = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardList/findPage',
    method: 'post',
    data
  })
}

//删除考核管理
export const deleteAssess = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardAssessment/del',
    method: 'delete',
    data
  })
}

//最新数据
export const getOneAssess = (data:any) => {
  return request({
    url: basePath + '/secure/assessInfo/getOneAssess',
    method: 'get',
    params: data
  })
}

//最新数据
export const updateData = (data:any) => {
  return request({
    url: basePath + '/tcdmSecureHazardList/put',
    method: 'put',
    data
  })
}